package com.ruoyi.chat.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@AllArgsConstructor
@NoArgsConstructor
// 指定生成的表名(集合名)为"chat_messages"
@Document("chat_messages")
public class ChatMessages {

    // 唯一标识，映射到MongoDB的_id字段,自动生成
    @Id
    private ObjectId id;

    //private int messageId;
    private Long memoryId;

    // 保存当前聊天记录列表的json字符串
    private String content;

    // 聊天时间，格式为yyyy-MM-dd HH:mm:ss
    private String chatTime;

}
